Use Python 3 for tests
authorSimon McVittie <smcv@debian.org>
Wed, 17 Jan 2018 14:07:32 +0000 (14:07 +0000)
committerAtomic Bot <atomic-devel@projectatomic.io>
Fri, 23 Feb 2018 22:49:06 +0000 (22:49 +0000)
Signed-off-by: Simon McVittie <smcv@debian.org>
Closes: #1463
Approved by: cgwalters

ci/build.sh
ci/travis-install.sh
tests/bootloader-entries-crosscheck.py
tests/test-basic-user-only.sh
tests/test-concurrency.py

index b56f57c6035ebeba8c1e8fe14a2be12b6658999e..be05604a81a4ba48f3ac4f93d20e40ac35393324 100755 (executable)
@@ -16,7 +16,14 @@ pkg_install sudo which attr fuse strace \
 if test -n "${CI_PKGS:-}"; then
     pkg_install ${CI_PKGS}
 fi
-pkg_install_if_os fedora gjs gnome-desktop-testing parallel coccinelle clang
+pkg_install_if_os fedora gjs gnome-desktop-testing parallel coccinelle clang \
+                  python3-PyYAML
+(. /etc/os-release;
+ if test "${ID}" = "centos"; then
+     rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
+     pkg_install python34{,-PyYAML}
+ fi
+)
 
 # Default libcurl on by default in fedora unless libsoup is enabled
 if sh -c '. /etc/os-release; test "${ID}" = fedora'; then
index 5d3d5a91651820d923fc30259d7f75decc92232f..8dd373d3d1324b1667a97160d6a171e6ea285bed 100755 (executable)
@@ -110,7 +110,7 @@ case "$ci_distro" in
             libcurl4-openssl-dev \
             procps \
             zlib1g-dev \
-            python-yaml \
+            python3-yaml \
             ${NULL}
 
         if [ "$ci_in_docker" = yes ]; then
index 5faa5487c346cca3e8da6d27aeb9f1b7c55114fc..41f6956e00273a09d898eea31ce48270df83ac82 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 #
 # Copyright (C) 2015 Red Hat
 #
index bea7b77f4d314e758020ff0bce2486d00fbe711e..5f27014ecf0636d4410b22188305ac8c0bab2736 100755 (executable)
@@ -28,7 +28,7 @@ extra_basic_tests=5
 . $(dirname $0)/basic-test.sh
 
 $CMD_PREFIX ostree --version > version.yaml
-python -c 'import yaml; yaml.safe_load(open("version.yaml"))'
+python3 -c 'import yaml; yaml.safe_load(open("version.yaml"))'
 echo "ok yaml version"
 
 # Reset things so we don't inherit a lot of state from earlier tests
index 3a0ce10336f373845761d09c4710f7bacc571d4a..3ec3681c9e93b53d5ca89f99af4f738ab9f4bd62 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (C) 2017 Colin Walters <walters@verbum.org>
 #